/*
 * eyes.h
 *
 *  Created on: Nov 26, 2012
 *      Author: michiel
 */

#ifndef EYES_MODEL_H_
#define EYES_MODEL_H_

#include "model_connector.h"
#include "comm/eyes_msg.h"

class EyesModel : public ModelConnector {
	private:
		bool _done;
	protected:
		float leftpitch_;
		float leftyaw_;
		float rightpitch_;
		float rightyaw_;

		float lp_;
		float ly_;
		float rp_;
		float ry_;
	public:
		EyesModel() : ModelConnector() {
			_done				= true;
			leftpitch_	=	0.0;
			leftyaw_		= 0.0;
			rightpitch_	= 0.0;
			rightyaw_		= 0.0;

			lp_ = 0.0;
			ly_ = 0.0;
			rp_ = 0.0;
			ry_ = 0.0;
		}
		~EyesModel() {}
		void init();
		void spin();
		void prepState();
		void handlerCallback(const comm::eyes::ConstPtr &msg);
		void moveEyes();
};


#endif /* EYES_MODEL_H_ */
